home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / gcc263-base.lha / gnu / etc / sys_config.sh < prev    next >
Text File  |  1994-07-25  |  2KB  |  74 lines

  1. :
  2. # NAME:
  3. #    sys_config.sh - set system specific variables
  4. #
  5. # SYNOPSIS:
  6. #    . /etc/sys_config.sh
  7. #
  8. # DESCRIPTION:
  9. #    Source this script into shell scripts that want to handle
  10. #    various system types.
  11. #    You may well want to edit this on a particular system replacing 
  12. #    `uname -s` etc with the result.  So that the facility will work 
  13. #    even when in single user mode and uname et al are not available.
  14. #
  15. # SEE ALSO:
  16. #    /etc/profile
  17. #
  18. # AMENDED:
  19. #    91/11/05 22:09:08 (rook)
  20. #
  21. # RELEASED:
  22. #    91/11/05 22:09:09 v1.3
  23. #
  24. # SCCSID:
  25. #    @(#)sys_config.sh 1.3 91/11/05 22:09:08 (rook)
  26. #
  27. #    @(#)Copyright (c) 1991 Simon J. Gerraty
  28. #
  29. #    This file is provided in the hope that it will
  30. #    be of use.  There is absolutely NO WARRANTY.
  31. #    Permission to copy, redistribute or otherwise
  32. #    use this file is hereby granted provided that 
  33. #    the above copyright notice and this notice are
  34. #    left intact. 
  35. #
  36.  
  37. # determin machine type
  38. #if [ -f /usr/bin/arch ]; then
  39. #    ARCH=`arch`
  40. #elif [ -f /usr/bin/uname -o -f /bin/uname ]; then
  41. #    ARCH=`uname -m`
  42. #fi
  43. ARCH=mc68000
  44. #
  45. case "$ARCH" in
  46. sun386)    uname=/usr/5bin/uname
  47.     OS=SunOS
  48.     ;;
  49. mc68000) uname=""
  50.     OS=AmigaDOS
  51.     HOSTNAME=amiga
  52.     ;;
  53. *)    uname=uname;;
  54. esac
  55.  
  56. # set the operating system type
  57. # you can't use `uname -s` with SCO UNIX
  58. # it returns the same string as `uname -n`
  59. # so set it manually
  60. # OS=SCO-UNIX
  61. # The eval below is a workaround for a bug in the PD ksh.
  62. #OS=${OS:-`eval $uname -s`}
  63. #HOSTNAME=${HOSTNAME:-`eval $uname -n`}
  64.  
  65. # set which ever is required to not produce a linefeed 
  66. # in an echo(1)
  67. case $OS in
  68. SunOS)    C="\c"; N="";
  69.     ;;
  70. *)    C="\c"; N=""
  71.     ;;
  72. esac
  73. export OS ARCH HOSTNAME C N uname
  74.